<template>
<div>
  <van-swipe style="height: 25px;" vertical autoplay="3000">
    <van-swipe-item style="line-height: 25px;font-size: 12px;background-color: antiquewhite;padding-left: 20px;box-sizing: border-box" class="swi" v-for="(item,index) in list" :key="index">
      <router-link :to="{path:'/detail',query:{categoryId:item.articleId}}" style="color: black">
<!--      <router-link :to="{path:'/detail',query:{categoryId:item.articleId}}" style="color: black">-->
      {{item.title}}
      </router-link>
    </van-swipe-item>
  </van-swipe>
</div>
</template>

<script>
import {switchOne} from "@/api/http";

export default {
name: "swiperTwo",
  data(){
  return {
    list:[]
  }
  },
  created() {
    switchOne(1,5).then(res=>{
      console.log(res)
      this.list = res.rows
    })
  }
}
</script>

<style scoped lang="less">
  .swi {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /deep/.van-swipe__indicator {
    height: 0px;
  }
</style>